<template>
	<div class="swiper">
         <swiper :options="swiperOption" v-if="showSwiper">
            <swiper-slide v-for="item in list" :key="item.id">
                <img class="swiper-img" :src="item.imgUrl"></swiper-slide>
            <div class="swiper-pagination"  slot="pagination"></div>
        </swiper>
		
	</div>
</template>
<script>
export default{
    name:'homeSwiper',
    data (){
        return{
            swiperOption:{
                pagination:'.swiper-pagination',
                loop:true,
            },
           
        }
    },
    props:{
        list:Array
    },
    computed:{
        showSwiper(){
            return this.list.length;
        }
    }
    

	}

</script>

<style>
.swiper{
    width: 100%;
    height: 0;
    padding-bottom: 30.67%;
    overflow: hidden;
    background: #ccc ;
    /* height: 31.25vm; */
}
.swiper-img{
    width: 100%;
}
.swiper .swiper-pagination-bullet-active{
background:#fff ;
}
	   
	   
</style>